package ichubbase

type RetCode int32

const (
	RetCode_SUCCESS RetCode = 200
	RetCode_ERROR   RetCode = 500
)

const (
	DATETIME_UTC = iota
	DATETIME_GMT8

	ZERO_TIME_INT64   = -62135596800
	PAGE_SIZE_ALL     = -1
	PAGE_SIZE_ZERO    = 0
	PAGE_SIZE_DEFAULT = 20
	PAGE_SIZE_MAX     = 500

	FormatDate     = "2006-01-02"
	FormatDateTime = "2006-01-02 15:04:05"
	FormatUTCTime  = "2006-01-02T15:04:05.000Z"
)

/*
统一GO代码多层生成工具，
author: leijianming
2021-08-01
*/
type ModuleDefine struct {
	DBNAME        string
	ModelPath     string
	ModelTestPath string
}

/* 根据这个切换不同系统的代码生成 */
const MODULE_NAME_SHOP = "icd/cms/shop"
const MODULE_NAME_NOW = "icd/cms"
const MODULE_NAME_NEW = "icd/common"

var (
	APP        = "hrms"
	MODULE_MAP = map[string]ModuleDefine{
		"cms": ModuleDefine{
			"cms_test",
			MODULE_NAME_SHOP,
			"icd/cms/shop-test",
		},
		"common": ModuleDefine{
			"strapi-common-dev",
			"icd/common/shop",
			"icd/common/shop-dev",
		},
		"hrms": ModuleDefine{
			"hrms",
			"gitee.com/ichub/gofactroy/common/shop",
			"gitee.com/ichub/gofactroy/common/shop-test",
		},
	}
)
